import React, { PureComponent, Fragment } from 'react';
import myStyle from './index.less';
import noDataPng from '@/src/assets/comps/table/noData.png';
export default class registerTableC extends PureComponent {
  state = {};

  componentDidMount() {}

  render() {
    const { dataSource, type } = this.props;
    return (
      <div className={myStyle.register}>
        <div className={`${myStyle.tableTitle} ${myStyle.titleColor}`}>
          <span>{type}</span>
          <span>{`${dataSource.length}条`}</span>
        </div>
        {dataSource.length ? (
          <ul>
            {dataSource.map((item, key) => {
              return (
                <li key={key} className={myStyle.tableTitle}>
                  <span title={item.number}>{item.number}</span>
                  <span title={item.content}>{item.content}</span>
                </li>
              );
            })}
          </ul>
        ) : (
          <div className='noData'>
            <img src={noDataPng} />
            <p>暂无数据</p>
          </div>
        )}
      </div>
    );
  }
}
